# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=xsoldier
pkgver=1.8
pkgrel=2
pkgdesc="A space-based shoot'em up game"
url="http://www.interq.or.jp/libra/oohara/xsoldier/"
arch="all"
license="GPL-2.0-only"
makedepends="libx11-dev libxpm-dev"
subpackages="$pkgname-doc"
source="http://www.interq.or.jp/libra/oohara/xsoldier/xsoldier-$pkgver.tar.gz
	format-security.patch
	xsoldier.desktop
	xsoldier.xpm
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--localstatedir=/var/games/xsoldier
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 "$srcdir"/xsoldier.desktop \
	"$pkgdir"/usr/share/applications/xsoldier.desktop
	install -Dm664 "$srcdir"/xsoldier.xpm \
	"$pkgdir"/usr/share/pixmaps/xsoldier-icon.xpm
}

sha512sums="
2f150c3ba31357cac03024146e3a02c9d69fbdaec8e8214284ee996a52eb58c4cf475192e38524f3e031d71a5f0c3b2c744ef1fc81a52eff8b0a9f44a48f8484  xsoldier-1.8.tar.gz
2a6044ca7e526d15ff04b1773f3f0a7659807a3606e0b4e6aa36430d727c5a2ffa2a415cfa3863a3b7bbdd47f24f716bb8815cb13bdfd2a23a0d3852c61156d5  format-security.patch
4681b43589ae4daf0840047279bf3ef0210a8d6a5341f7221b6e0d5da28f66f9f79cb30c455734722f277ad7ea29d6aa314c4fb641eaf0c87ba896871ea43111  xsoldier.desktop
de49e259b6e1e8a7481b6746c0620a635b7b2e989cb7c7a6170aba80a726bdee6e3be0614d0f40a8302d53fb86e17a6b97b260615e52cd287772bbe6ac4fee85  xsoldier.xpm
"
